package school.dao;

import java.util.List;

import school.entity.Student;

public class TestDaoStudent {

	public static void main(String[] args) {

		StudentDao dao = new MySqlStudentDao();
		// Student s = dao.find(1300L);
		// if (s == null) {
		// System.out.println("没有这个学生");
		// return;
		// }
		// System.out.println(s);
		List<Student> list = dao.query();
		for (Student s : list) {
			System.out.println(s.getStuno() + "," + s.getSname());
		}
		Student st = new Student();
		st.setSname("xxx");
		dao.add(st);
	}

}
